<template>
	<view>
		<!-- <view class="" :style="'height:'+statusBarHeight+'rpx'"></view> -->
		<u-navbar
			:title="title"
			@leftClick="leftClick"
			@rightClick="rightClick"
			:placeholder="true"
			leftIconSize="23"
			bgColor="#F2F2F2"
		>
			<view
				class="u-nav-slot right"
				slot="right"
			>
				<image src="../static/wallet/record.png" mode=""></image>
			</view>
		</u-navbar>
		<!-- <view class="line"></view> -->
	</view>
</template>

<script>
	export default {
		name:"navbar",
		props:['title','type'],
		data() {
			return {
				statusBarHeight:0
			};
		},
		onShow() {
			const phoneInfo = uni.getSystemInfoSync(); // 获取手机系统信息
			this.statusBarHeight = phoneInfo.statusBarHeight
		},
		methods:{
			rightClick() {
				console.log('rightClick');
				this.$fun.jump(`/pages/wallet/record?type=${this.type}&title=${this.title}`)
			},
			leftClick() {
				uni.navigateBack({
					delta:1
				})
			},
		}
	}
</script>

<style lang="scss">
.right{
	image{
		width: 38rpx;
		height: 42rpx;
	}
}
.line{
	margin-top: 88rpx;
	width: 750rpx;
	height: 16rpx;
	background: #F2F2F2;
}
</style>